﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script type="text/javascript"  src="./My97DatePicker/WdatePicker.js"></script>

   <!-- <link type="text/css" href="./timepicker/css/jquery-ui-1.8.17.custom.css" rel="stylesheet" />
    <link type="text/css" href="./timepicker/css/jquery-ui-timepicker-addon.css" rel="stylesheet" />
    <script type="text/javascript" src="./timepicker/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="./timepicker/js/jquery-ui-1.8.17.custom.min.js"></script>
    <script type="text/javascript" src="./timepicker/js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="./timepicker/js/jquery-ui-timepicker-zh-CN.js"></script>-->

    <link href="TestStyleSheet.css" rel="stylesheet" type="text/css" />
    <script src="./Script/TestJavaScript.js" type="text/javascript"></script>
    <script src="./Script/DateSelect.js" type="text/javascript"></script>
    <script type="text/javascript">
        //$(function () {
        //    $(".ui_timepicker").datetimepicker({
        //        showSecond: true,
        //        timeFormat: 'hh:mm:ss',
        //        stepHour: 1,
        //        stepMinute: 1,
        //        stepSecond: 1
        //    })
        //});
        
                    //   $('#TextBox1').prop("readonly", true).timepicker({
                    //    timeText: '时间',
                    //    hourText: '小时',
                    //    minuteText: '分钟',
                    //    secondText: '秒',
                    //    currentText: '现在',
                    //    closeText: '完成',
                    //    showSecond: true, //显示秒  
                    //    timeFormat: 'HH:mm:ss' //格式化时间  
                    //});

        window.onload = function () {
            // a();
            init();
        };
        //禁用enter提交表单  用的textbox但好像target只针对标签 所以值永假
       // document.onkeydown = function (event) {
       //           (event.keyCode == 13) {   
       //event.keyCode = 9;
       //return false;
        //}
    //    document.onkeydown = function (event) {
    //        if (event.keyCode == 13) {
    //            event.keyCode = 9;
    //            return false;
    //        }
    //          var inputs = document.getElementsByTagName("input");
    //         var index = 1;
    //for (var i = 0; i < inputs.length; i++) {
    //    if (inputs[i].type == "text" && inputs[i].style.display != "none" && inputs[i].getAttribute("disabled") != "disabled") {
    //        //给页面上的没有隐藏的文本框设置tabindex顺序值，下文按tabindex顺序跳转
    //        inputs[i].setAttribute("tabindex", index);
    //        //监听onkeydown事件,输入回车时实现跳至下一文本框
    //        inputs[i].onkeydown = goNextInput;
    //        index++;
    //    }
    //}
    //    }
    //var target,code,tag;
    //if (!event) {
    //    event = window.event; //针对ie浏览器
    //    target = event.srcElement;
    //    code = event.keyCode;
    //    if (code == 13) {
    //        tag = target.tagName;
    //        if (tag == "TEXTAREA") { return true; }
    //        else { return false; }
    //    }
    //}
    //else {
    //    target = event.target; //针对遵循w3c标准的浏览器，如Firefox
    //    code = event.keyCode;
    //    if (code == 13) {
    //        event.keyCode = 9;
    //        tag = target.tagName;
    //        //md不禁用刷新掉页面 不禁用就只赋值执行不到事件
    //        //if (tag == "INPUT") { return false; }
    //        //else { return true; }
    //    }
    //}
//};
//        window.onload = function () {
//    //阻止按回车按钮后提交表单的问题
//    document.getElementsByTagName("form")[0].onkeydown = function () {
//        if (event.keyCode == 13) { return false; }
//    };
//    var inputs = document.getElementsByTagName("input");
//    var index = 1;
//    for (var i = 0; i < inputs.length; i++) {
//        if (inputs[i].type == "text" && inputs[i].style.display != "none" && inputs[i].getAttribute("disabled") != "disabled") {
//            //给页面上的没有隐藏的文本框设置tabindex顺序值，下文按tabindex顺序跳转
//            inputs[i].setAttribute("tabindex", index);
//            //监听onkeydown事件,输入回车时实现跳至下一文本框
//            inputs[i].onkeydown = goNextInput;
//            index++;
//        }
//    }
//};

//function goNextInput() {
//    if (window.event.keyCode == 13) { //录入回车时才往下一录入框跳
//        //下一个录入框的tabindex值
//        var nextIndex = parseInt(window.event.srcElement.getAttribute("tabindex")) + 1;
//        var inputs = document.getElementsByTagName("input");
//        for (var i = 0; i < inputs.length; i++) {
//            if (inputs[i].type == "text" && inputs[i].style.display != "none") {
//                var tabIndex = inputs[i].getAttribute("tabindex");
//                if (tabIndex != null) {
//                    var index = parseInt(tabIndex);
//                    if (typeof index == "number" && !isNaN(index) && index == nextIndex) {
//                        inputs[i].focus();
//                    }
//                }
//            }
//        }
//    }
//}
    </script>
</head>
<body>
    <div class="maindiv">
        <p>》当前功能：出生信息登记</p>
        <form id="form1" runat="server">
            <!--onclick="return false;"-->
            <!-- 出生信息操作-->
            <div>
                <p>==============================-出生信息登记操作=============================</p>
                <br />
                <asp:Label ID="Label1" runat="server" Text="出生证号："></asp:Label>
                <asp:TextBox ID="chushengzhenghao" runat="server" CssClass="ipt"></asp:TextBox>
                &nbsp&nbsp&nbsp&nbsp<asp:Label ID="Label2" runat="server" Text="姓         名："></asp:Label>
                <asp:TextBox ID="Name" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label3" runat="server" Text="性        别："></asp:Label>
                <asp:DropDownList ID="Sex" runat="server" CssClass="slt">
                    <asp:ListItem>男</asp:ListItem>
                    <asp:ListItem>女</asp:ListItem>
                    <asp:ListItem>不详</asp:ListItem>
                </asp:DropDownList>
                <br />
                <asp:Label ID="Label4" runat="server" Text=" 住  院  号："></asp:Label>
                <asp:TextBox ID="zhuyuanhao" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label5" runat="server" Text="住院日期："></asp:Label>
                <asp:TextBox ID="zhuyuanriqi" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label6" runat="server" Text="出院日期："></asp:Label>
                <asp:TextBox ID="chuyuanriqi" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ValidationExpression="^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1,3-9]|1[0-2])[\/\-\.](?:29|30))(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1,3,5,7,8]|1[02])[\/\-\.]31)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])[\/\-\.]0?2[\/\-\.]29)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:16|[2468][048]|[3579][26])00[\/\-\.]0?2[\/\-\.]29)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1-9]|1[0-2])[\/\-\.](?:0?[1-9]|1\d|2[0-8]))(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$" ControlToValidate="zhuyuanriqi">住院日期格式：1997-02-15</asp:RegularExpressionValidator>
                &nbsp
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ValidationExpression="^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1,3-9]|1[0-2])[\/\-\.](?:29|30))(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1,3,5,7,8]|1[02])[\/\-\.]31)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])[\/\-\.]0?2[\/\-\.]29)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:16|[2468][048]|[3579][26])00[\/\-\.]0?2[\/\-\.]29)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1-9]|1[0-2])[\/\-\.](?:0?[1-9]|1\d|2[0-8]))(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$" ControlToValidate="chuyuanriqi">出院格式如：2019-11-12</asp:RegularExpressionValidator>
                <br />
                <asp:Label ID="Label7" runat="server" Text="出生日期："></asp:Label>
                <asp:TextBox ID="chushengriqi" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="label00" runat="server" Text="出生时间："></asp:Label>
                <asp:TextBox ID="chushengshijian" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:TextBox ID="TextBox1" runat="server" CssClass="ipt" onclick="WdatePicker({skin:'whyGreen',dateFmt:'H:mm:ss'})" Width="25px"></asp:TextBox>
               <!-- <input type="text" id="d242" onclick="WdatePicker({skin:'whyGreen',dateFmt:'H:mm:ss'})" class="Wdate" />-->
                &nbsp;<asp:Label ID="Label9" runat="server" Text="出生孕周："></asp:Label>
                <asp:TextBox ID="chushengyunzhou_zhou" runat="server" Width="36px" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label10" runat="server" Text="周"></asp:Label>
                <asp:TextBox ID="chushengyunzhou_tian" runat="server" Width="37px" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label12" runat="server" Text="天"></asp:Label>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ControlToValidate="chushengriqi" ValidationExpression="^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1,3-9]|1[0-2])[\/\-\.](?:29|30))(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1,3,5,7,8]|1[02])[\/\-\.]31)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])[\/\-\.]0?2[\/\-\.]29)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:16|[2468][048]|[3579][26])00[\/\-\.]0?2[\/\-\.]29)(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$|^(?:(?:1[6-9]|[2-9]\d)?\d{2}[\/\-\.](?:0?[1-9]|1[0-2])[\/\-\.](?:0?[1-9]|1\d|2[0-8]))(?: (?:0?\d|1\d|2[0-3])\:(?:0?\d|[1-5]\d)\:(?:0?\d|[1-5]\d)(?: \d{1,3})?)?$">出生日期如：1999-09-9</asp:RegularExpressionValidator>
                &nbsp<!--[19|20]*\d{2}[-]{1}\d{2}[-]{1}\d{2}-->
            <!--快两小时找不出问题暂时用真.*--><!--我吐了  不是什么问题  是tmd中英文状态下输入的：验证识别尼玛不一样-->
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ControlToValidate="chushengshijian" ValidationExpression="^(20|21|22|23|[0-1]\d)：[0-5]\d：[0-5]\d$">出生时间格式如：00：00：00</asp:RegularExpressionValidator>
                <br />
                <asp:Label ID="Label11" runat="server" Text="分娩地点："></asp:Label>
                <asp:DropDownList ID="fenmiandidian" runat="server" OnSelectedIndexChanged="fenmiandidian_SelectedIndexChanged" AutoPostBack="True" CssClass="slt">
                    <asp:ListItem Selected="True">医院</asp:ListItem>
                    <asp:ListItem>家中</asp:ListItem>
                    <asp:ListItem>其他</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox ID="fenmian" runat="server" Width="36px" Enabled="False" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label13" runat="server" Text="接生医院："></asp:Label>
                <asp:DropDownList ID="jieshengyiyuan" runat="server" OnSelectedIndexChanged="jieshengyiyuan_SelectedIndexChanged" AutoPostBack="True" CssClass="slt">
                    <asp:ListItem>福建省妇幼保健院</asp:ListItem>
                    <asp:ListItem>福建省立医院</asp:ListItem>
                </asp:DropDownList>
                <asp:Label ID="label" runat="server" Text="接  生  员："></asp:Label>
                <asp:DropDownList ID="jieshengyuan" runat="server" CssClass="slt">
                    <asp:ListItem>李春燕</asp:ListItem>
                    <asp:ListItem>王晓敏</asp:ListItem>
                </asp:DropDownList>
                <br />
                <asp:Label ID="Label15" runat="server" Text="胎  数:"></asp:Label>
                <asp:DropDownList ID="taishu" runat="server" CssClass="slt">
                    <asp:ListItem>单胎</asp:ListItem>
                    <asp:ListItem>多胎</asp:ListItem>
                    <asp:ListItem>双胎</asp:ListItem>
                </asp:DropDownList>
                <asp:Label ID="Label16" runat="server" Text="胎  次:"></asp:Label>
                <asp:TextBox ID="taici" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label17" runat="server" Text="出生体重:"></asp:Label>
                <asp:TextBox ID="chushengtizhong" runat="server" Width="38px" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label18" runat="server" Text="kg"></asp:Label>
                <asp:Label ID="Label19" runat="server" Text="出生身长:"></asp:Label>
                <asp:TextBox ID="chushengshenchang" runat="server" Width="38px" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label20" runat="server" Text="cm"></asp:Label>
                <br />
                <asp:Button ID="nSubmit" runat="server" Text="保存" OnClick="Submit_Click" UseSubmitBehavior="False" CssClass="ipt" />
                <!--<input type="submit" /><input type="reset" />-->
                <asp:Button ID="Cancel" runat="server" Text="取消" OnClick="Cancel_Click" UseSubmitBehavior="False" CssClass="ipt" />
            </div>
            <!-- 出生信息查询-->
            <div>
                <p>===============================-出生信息查询===============================</p>
                <br />
                <asp:DropDownList ID="QueryMode" runat="server" OnSelectedIndexChanged="QueryMode_SelectedIndexChanged" AutoPostBack="True" CssClass="slt">
                    <asp:ListItem>出生证号</asp:ListItem>
                    <asp:ListItem>住院号</asp:ListItem>
                    <asp:ListItem>姓名</asp:ListItem>
                    <asp:ListItem>出生证号模糊</asp:ListItem>
                    <asp:ListItem>住院号模糊</asp:ListItem>
                    <asp:ListItem>姓名模糊</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox ID="QueryData" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label22" runat="server" Text="登记日期："></asp:Label>
                <asp:TextBox ID="Start_dengjiriqi" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Label ID="Label23" runat="server" Text="至"></asp:Label>
                <asp:TextBox ID="End_dengjiriqi" runat="server" CssClass="ipt"></asp:TextBox>
                <asp:Button ID="Select" runat="server" Text="查询" OnClick="Select_Click" CssClass="ipt" />
                <br />
                <asp:Button ID="Page_Back" runat="server" Text="上一页" OnClick="Page_Back_Click" CssClass="ipt" />
                <asp:Button ID="Page_Next" runat="server" Text="下一页" OnClick="Page_Next_Click" CssClass="ipt" />
                <asp:Label ID="xx" runat="server" Text="Label"></asp:Label>
                <asp:DropDownList ID="PageSelected" runat="server" OnSelectedIndexChanged="PageSelected_SelectedIndexChanged" CssClass="slt">
                    <asp:ListItem Selected="True">10</asp:ListItem>
                    <asp:ListItem Value="20"></asp:ListItem>
                </asp:DropDownList>
                <br />
                <asp:GridView ID="DataShow" runat="server" AutoGenerateColumns="False" DataKeyNames="BirthCertificateNumber" AllowPaging="True" OnRowCancelingEdit="DataShow_RowCancelingEdit" OnRowDeleting="DataShow_RowDeleting" OnRowEditing="DataShow_RowEditing" OnRowUpdating="DataShow_RowUpdating" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True">
                    <Columns>
                        <asp:BoundField DataField="BirthCertificateNumber" HeaderText="出生证号" SortExpression="BirthCertificateNumber" />
                        <asp:BoundField DataField="Name" HeaderText="姓名" SortExpression="Name" />
                        <asp:BoundField DataField="Sex" HeaderText="性别" SortExpression="Sex" />
                        <asp:BoundField DataField="HospitalizationNumber" HeaderText="住院号" SortExpression="HospitalizationNumber" />
                        <asp:BoundField DataField="Birthday" HeaderText="生日" SortExpression="Birthday" />
                        <asp:BoundField DataField="MidwifeHospital" HeaderText="接生医院" SortExpression="MidwifeHospital" />
                        <asp:BoundField DataField="DateOfRegistration" HeaderText="注册日期" SortExpression="DateOfRegistration" />
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbtnDelete" Style="text-decoration: none" runat="server" Text="删除"
                                    OnClientClick="return confirm('你确定要删除吗?')" CommandName="delete">
                                </asp:LinkButton>
                                <asp:LinkButton ID="lbtnEdit" Style="text-decoration: none" runat="server" Text="编辑" CommandName="edit">
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="th" />
                </asp:GridView>
            </div>
        </form>
    </div>
</body>
</html>
